﻿#ifndef COLORUI_H
#define COLORUI_H

#include <QWidget>
#include <QCloseEvent>

namespace Ui {
class colorUI;
}

#pragma execution_character_set("utf-8")

#include "tool.h"

class colorUI : public QWidget
{
    Q_OBJECT

public:
    explicit colorUI(QWidget *parent = nullptr);
    ~colorUI();

    void setWin(int x,int y,int w,int h,int winWidth=0,int winHeight=0);

    void setContrast(int value);
    void setContrastLimit(int min,int max);
    void setBrightness(int value);
    void setBrightnessLimit(int min,int max);
    void setSaturation(int value);
    void setSaturationLimit(int min,int max);
    void setGamma(int value);
    void setGammaLimit(int min,int max);

signals:
    void sendExit(void);
    void sendMove(int x,int y);
    void sendSize(int w,int h);
    void sendContrast(int value);
    void sendBrightness(int value);
    void sendSaturation(int value);
    void sendGamma(int value);

private slots:
    void on_horizontalSliderContrast_valueChanged(int value);
    void on_horizontalSliderBrightness_valueChanged(int value);
    void on_horizontalSliderSaturation_valueChanged(int value);
    void on_horizontalSliderGamma_valueChanged(int value);

private:
    Ui::colorUI *ui;

protected:
    void closeEvent(QCloseEvent *event) override;
    void moveEvent(QMoveEvent *event) override;
    void resizeEvent(QResizeEvent *event) override;

};

#endif // COLORUI_H
